package com.eric.nioclient.data;

/**
 * Created by chenwei on 2017/11/23.
 */

public class Msg {
    public static final int TYPE_CHAT = 0;
    public static final int TYPE_NOTICE = 1 ;

    public int type ;
    public String user;
    public String content;


    public static Msg obtainNotice(String msg){
        Msg m = new Msg();
        m.type = TYPE_NOTICE ;
        m.content = msg;
        return m;
    }

    public static Msg obtainChat(String user ,String msg){
        Msg m = new Msg();
        m.type = TYPE_CHAT ;
        m.content = msg;
        m.user = user;
        return m;
    }
}
